package cglib;

public class Client {
    public static void main(String[] args) {
        //创建代理类
        ProxyFactory proxyFactory = new ProxyFactory(new TeacherDao());
        ITeacherDao proxyInstance = (ITeacherDao)proxyFactory.getProxyInstance();
        //调用代理类的方法
        proxyInstance.teach();
        System.out.println("**************************************");
        proxyInstance.sayHello("小红");
    }
}
